Optimal. Leaf size=116 \[ \frac {2 A \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{a^{3/2} d}-\frac {3 A \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a-a \sec (c+d x)}}\right )}{\sqrt {2} a^{3/2} d}-\frac {A \tan (c+d x)}{d (a-a \sec (c+d x))^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 133, normalized size of antiderivative = 1.15, number of steps
used = 6, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {3989, 3972,
482, 536, 209} \begin {gather*} \frac {2 A \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{a^{3/2} d}-\frac {3 A \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a-a \sec (c+d x)}}\right )}{\sqrt {2} a^{3/2} d}+\frac {A \sin (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{2 a d \sqrt {a-a \sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 482
Rule 536
Rule 3972
Rule 3989
Rubi steps
\begin {align*} \int \frac {A+A \sec (c+d x)}{(a-a \sec (c+d x))^{3/2}} \, dx &=-\left ((a A) \int \frac {\tan ^2(c+d x)}{(a-a \sec (c+d x))^{5/2}} \, dx\right )\\ &=\frac {(2 A) \text {Subst}\left (\int \frac {x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )^2} \, dx,x,-\frac {\tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{d}\\ &=\frac {A \csc ^2\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)}{2 a d \sqrt {a-a \sec (c+d x)}}-\frac {A \text {Subst}\left (\int \frac {1-a x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac {\tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{a d}\\ &=\frac {A \csc ^2\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)}{2 a d \sqrt {a-a \sec (c+d x)}}-\frac {(2 A) \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,-\frac {\tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{a d}+\frac {(3 A) \text {Subst}\left (\int \frac {1}{2+a x^2} \, dx,x,-\frac {\tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{a d}\\ &=\frac {2 A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a-a \sec (c+d x)}}\right )}{a^{3/2} d}-\frac {3 A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a-a \sec (c+d x)}}\right )}{\sqrt {2} a^{3/2} d}+\frac {A \csc ^2\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)}{2 a d \sqrt {a-a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 1.55, size = 265, normalized size = 2.28 \begin {gather*} \frac {A \left (\sqrt {2} e^{-\frac {1}{2} i (c+d x)} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}} \left (2 i d x-2 \sinh ^{-1}\left (e^{i (c+d x)}\right )-3 \sqrt {2} \log \left (1-e^{i (c+d x)}\right )-2 \log \left (1+\sqrt {1+e^{2 i (c+d x)}}\right )+3 \sqrt {2} \log \left (1+e^{i (c+d x)}+\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}\right )\right )-\left (\cos \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {3}{2} (c+d x)\right )\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {\sec (c+d x)}\right ) \sec ^{\frac {3}{2}}(c+d x) \sin ^3\left (\frac {1}{2} (c+d x)\right )}{d (a-a \sec (c+d x))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(297\) vs.
\(2(99)=198\).
time = 4.63, size = 298, normalized size = 2.57
method | result | size |
default | \(-\frac {A \left (-1+\cos \left (d x +c \right )\right )^{2} \left (\left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \sqrt {2}\, \cos \left (d x +c \right )+\left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \sqrt {2}+3 \sqrt {2}\, \cos \left (d x +c \right ) \arctan \left (\frac {1}{\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )+\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}\, \cos \left (d x +c \right )+4 \cos \left (d x +c \right ) \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}}{2}\right )-3 \sqrt {2}\, \arctan \left (\frac {1}{\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )-\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}-4 \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}}{2}\right )\right ) \sqrt {2}}{d \left (\frac {a \left (-1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \sin \left (d x +c \right )^{3} \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}}}\) | \(298\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 211 vs.
\(2 (99) = 198\).
time = 1.49, size = 502, normalized size = 4.33 \begin {gather*} \left [-\frac {3 \, \sqrt {2} {\left (A \cos \left (d x + c\right ) - A\right )} \sqrt {-a} \log \left (\frac {2 \, \sqrt {2} {\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} + {\left (3 \, a \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right )}{{\left (\cos \left (d x + c\right ) - 1\right )} \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) + 4 \, {\left (A \cos \left (d x + c\right ) - A\right )} \sqrt {-a} \log \left (\frac {2 \, {\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} - {\left (2 \, a \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right )}{\sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) - 4 \, {\left (A \cos \left (d x + c\right )^{2} + A \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}}}{4 \, {\left (a^{2} d \cos \left (d x + c\right ) - a^{2} d\right )} \sin \left (d x + c\right )}, \frac {3 \, \sqrt {2} {\left (A \cos \left (d x + c\right ) - A\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) - 4 \, {\left (A \cos \left (d x + c\right ) - A\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) + 2 \, {\left (A \cos \left (d x + c\right )^{2} + A \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )}}}{2 \, {\left (a^{2} d \cos \left (d x + c\right ) - a^{2} d\right )} \sin \left (d x + c\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} A \left (\int \frac {\sec {\left (c + d x \right )}}{- a \sqrt {- a \sec {\left (c + d x \right )} + a} \sec {\left (c + d x \right )} + a \sqrt {- a \sec {\left (c + d x \right )} + a}}\, dx + \int \frac {1}{- a \sqrt {- a \sec {\left (c + d x \right )} + a} \sec {\left (c + d x \right )} + a \sqrt {- a \sec {\left (c + d x \right )} + a}}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.07, size = 112, normalized size = 0.97 \begin {gather*} \frac {\frac {3 \, \sqrt {2} A \arctan \left (\frac {\sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a}}{\sqrt {a}}\right )}{a^{\frac {3}{2}}} - \frac {4 \, A \arctan \left (\frac {\sqrt {2} \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a}}{2 \, \sqrt {a}}\right )}{a^{\frac {3}{2}}} - \frac {\sqrt {2} \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a} A}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+\frac {A}{\cos \left (c+d\,x\right )}}{{\left (a-\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________